#include<bits/stdc++.h>
#define int long long
using namespace std;

map<char, char> m;
map<pair<char, char>, int> mp; // 记录每个不满足条件的碱基对的个数
void solve(){
	m['A'] = 'T';
	m['T'] = 'A';
	m['C'] = 'G';
	m['G'] = 'C';
	
	int n;
	cin >> n;
	string s1, s2;
	cin >> s1 >> s2;
	s1 = " " + s1;
	s2 = " " + s2;
	for (int i=1; i<=n;i++) {
		if (m[s1[i]] != s2[i]) {
			mp[{s2[i], m[s1[i]]}]++;
		}
	}
	int ans = 0;
	for (auto now:mp) {
		auto[x, y] = now;
		auto[a, b] = x;
		int cnt1 = y;
		int cnt2 = mp[{b, a}];
		int cnt = min(cnt1, cnt2);
		ans += cnt;
		mp[x] -= cnt;
		mp[{b,a}] -= cnt;
	}
	for (auto now:mp) {
		auto[x, y] = now;
		ans += y;
	}
	cout << ans << '\n';
	
}


signed main(){
	int t = 1;
	while(t--){
		//TODO
		solve();
	}
	return 0;
}
